<template>
	<view class="oredr_card" @click="goOrderDetail">
		<view class="u-flex u-flex-between u-flex-items-center">
			<view class="u-info f-s-12">{{orderInfo.createAt}}</view>
			<orderStatus :status="orderInfo.status" />
		</view>
		<view class="u-flex u-flex-1 u-m-t-16">
			<image :src="orderInfo.courseCard.img" class="image_" mode="aspectFill"></image>
			<view class="u-flex-1 u-m-l-12">
				<view class="u-line-2 f-s-14 u-m-b-18">{{orderInfo.courseCard.name}}</view>
				<Price :price="(orderInfo.money)/100"></Price>
			</view>
		</view>
		<u-divider></u-divider>
		<view class="u-info f-s-12">订单号：{{orderInfo.orderNo}}</view>
	</view>
</template>

<script setup>
	import {
		defineProps
	} from 'vue';
	import orderStatus from '@/components/order/order_status.vue'
	import tag from "../components/tag.vue"
	import Price from '@/components/price.vue'
	const props = defineProps({
		orderInfo: Object
	})

	function goOrderDetail() {
		uni.navigateTo({
			url: '/subPackages/order/details/course_detail?orderNo=' + props.orderInfo.orderNo
		})
	}
</script>

<style lang="scss">
	.oredr_card {
		margin: 12px;
		background-color: #fff;
		border-radius: 8px;
		padding: 12px;

		.image_ {
			width: 260rpx;
			height: 145rpx;
			background: #D9D9D9;
			border-radius: 8rpx;
		}
	}
</style>